package com.example.mybatis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/1/12 0012.
 */

@Service
public class DemoService {

    @Autowired
    private DemoMapper demoMappper;

    public List<Demo> likeName(String name){
        return demoMappper.likeName(name);
    }

    public Demo save(String name){
        Demo demo = new Demo();
        demo.setName(name);
        demoMappper.save(demo);
        return demo;
    }

}
